package ecom.appcode.business;

import java.util.Random;

public class SizeLogicImpl implements SizeLogic {
    public int rdInt(int a, int b) {
        Random random = new Random();
        while (true) {
            // + 1 để cho ra trường hợp random = b ;
            int result = random.nextInt() % b + 1;
            if (result >= a) {
                return result;
            }
        }
    }

}
